# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=krunner
pkgver=5.95.0
pkgrel=0
pkgdesc="Framework for providing different actions given a string query"
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit
arch="all !armhf !s390x !riscv64"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only AND LGPL-2.1-or-later"
depends_dev="
	kconfig-dev
	kcoreaddons-dev
	ki18n-dev
	kio-dev
	kservice-dev
	plasma-framework-dev
	plasma-framework-dev
	qt5-qtbase-dev
	threadweaver-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt5-qttools-dev
	samurai
	"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/krunner-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc"
options="!check" # Requires running dbus instance

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
f8be80109af811c9c2c30c1751d9e126c99d36a44821a498de4ff69ab035caaabdd3273940594a7a576e6f5532aa039824d7599d3106224bca01440a1bc94c41  krunner-5.95.0.tar.xz
"
